home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 41.zip
/
BS1 part 41
/
The Director v1.2.adf
/
Scripts
/
Telemetry
< prev
next >
Wrap
Text File
|
1988-05-08
|
3KB
|
153 lines
rem *** example of ShowANIM playing from the Director ***
rem first do the anim setup
memory all,chip,fast
if all<600000:sm=0:else:sm=1:endif
execute a,"assign mod: The_Director:options"
module "sound"
pause 3
print
print "This is an example of a Director script that"
print "combines an IFF ANIM animation file (which was"
print "created by VideoScape-3D), with partial screen"
print "page-flipping, color cycling, and sound. ";
sound perioda,"load",1,"The_Director:sounds/telemetry.snd"
pause 20
setblack 1
wavepos=0
waveform=510
load 1,"The_Director:pictures/telscreen"
load 3,"The_Director:pictures/telcells"
loadanim 21,"The_Director:anims/tel.anim"
if sm
sound periodb,"load",2,"The_Director:sounds/phart.snd"
endif
sound periodc,"load",3,"The_Director:sounds/comms.snd"
sound a,"play",1,0,63
sound a,"play",1,0,63
abort 0
rem initialize stuff:
position -1,-1
new 2,1
array 100,1
copy 1,2
display 2
speed 1
buff = 1
intlv = 0
n = 2
flag=0
p=1
setblack 0
cycle 1
fixpalette 1
blitdest buff
rem get the pageflip started:
gosub 710
gosub 710
gosub 610:rem init the other window
rem main loop
rem check for mouse click explicitly so we can fade the
rem sound out when abort is signalled.
101 for l=0 to 60+?200
ifmouse xm,ym
if xm#-1:goto 102:endif
gosub 320+390*?2
next
gosub 410
gosub 610
goto 101
rem mouse abort detected, wait for sound fadeout
102 sound a,"slowfade",10
gosub 320
for l=0 to 220
gosub 320+390*?2
next
fade 0,-1,2
end
rem do next frame in the anim:
rem set p=1 first if normal delay,
rem set p=0 first if you want to bypass delay
rem to make up time for other stuff being done in between frames
310 pause 1
320 if intlv
skipanim 21,buff,abs,rel,intlv
endif
anim 21,buff,abs,rel,intlv
display buff
buff=3-buff
blitdest buff
goto waveform
rem intermittent sound routine
410 snd=2+?2
if snd=2:period=500+?1000
else
z=?400
period=periodc+z-200
wavepos=0
wavec=50+z/10
waveform=520
endif
sound a,"play",snd,1,47,period
sound a,"play",snd,1,47,period
return
rem waveform 1 routine
510 blit 3,wavepos,0,98,27,94,19
z=0~(wavepos-94)
zz=98+94-z
blit 3,0,0,zz,27,z,19
wavepos=(wavepos+4)%188
return
rem waveform 2 routine
520 blit 3,wavepos,0,98,27,94,19
rem wavepos=94-wavepos
wavepos=?94
wavec=wavec-1
if 0=wavec:waveform=510:endif
return
rem com-vid screen
610 t=31+63*?3
blit 3,0,t,25,123,95,63
gosub 320
blit 3,0,t,25,123,95,63
t=46*?5
x=33+33*?2
gosub 320
y=131+31*?2
transparent 1
blit 3,t,19,x,y,45,12
transparent 0
gosub 320
transparent 1
blit 3,t,19,x,y,45,12
transparent 0
return
rem page flip
710 X=96+?161:Y=31+?126
blit 3,X,Y,215,123,95,63
gosub 320
blit 3,X,Y,215,123,95,63
return